adTempus API
ArcanaDevelopment.adTempus.Client Namespace / Option Class / GetValueAsEnum Method / GetValueAsEnum<T>(T) Method


In This Topic
    GetValueAsEnum<T>(T) Method
    In This Topic
    Attempts to return the value as an enum of type T.
    Syntax
    'Declaration
     
    
    Public Overloads Function GetValueAsEnum(Of T As {New, Enum, Struct})( _
       ByVal defaultValue As T _
    ) As T
    public T GetValueAsEnum<T>( 
       T defaultValue
    )
    where T: new(), Enum, struct
    public:
    T^ GetValueAsEnumgeneric<typename T>
    ( 
       T^ defaultValue
    ) 
    where T: gcnew(), Enum, value class

    Parameters

    defaultValue

    Type Parameters

    T

    Return Value

    The T value of the option, or a null reference (Nothing in Visual Basic) if no value is set or if the value cannot be converted to T.
    See Also